-
Couldn't load subscription status.
- Fork 2.1k
drivers/sx126x add optional CONFIG_SX126X_DEFAULT_SYNC_WORD #21711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Please add some documentation as to what |
afe97d8 to
3aa6c33
Compare
3aa6c33 to
450b653
Compare
| #if defined(DOXYGEN) | ||
| /** | ||
| * @brief Configure the LoRa sync word | ||
| * | ||
| * The sync word for sx126x is 16 bits long. | ||
| * Private networks should use 0x1424. | ||
| * Public networks should use 0x3444. | ||
| * Using the driver API you only configure 2 nibbles Y and Z to form a sync word 0xY4Z4. | ||
| * The default chip value is 0x12 (0x1424). | ||
| * | ||
| * See https://blog.classycode.com/lora-sync-word-compatibility-between-sx127x-and-sx126x-460324d1787a | ||
| * for more information and a comparison with sx127x. | ||
| */ | ||
| # define CONFIG_SX126X_DEFAULT_SYNC_WORD 0x12 | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say every CONFIG_ may be set by a user. There are a few CONFIG_ in some c files, which means they do not appear in the Doxygen doc. I moved it to internal because I am going to move all the other CONFIG_ there as well.
There are 2 ways that make sense to me. Either all CONFIG_ go to a public header where it is more likely to be seen by a user. Or some (if not all) CONFIG_ macros go to internal headers because setting them requires more experienced knowledge. There is no strict rule at the moment. The user is likely a (student) developer, so I would say the user is also able to look at internal doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to public header
|
Also small nitpick: the headline and commit message are missing the |
|
So the commit message check lacks the check for the |
450b653 to
7bd175e
Compare
This smells like a NETOPT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a NETOPT for the sync word would be a good follow-up, but setting the default value is independent of that.


Contribution description
Configure a LoRa sync word if
CONFIG_SX126X_DEFAULT_SYNC_WORDis definedAlternatively, should it be in
params, in case 2 LoRa on a board should use different sync words?Testing procedure
Issues/PRs references
#21675